package com.peanut.baby.mvp.bbs.detail;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.peanut.baby.R;
import com.peanut.baby.model.BBSComment;
import com.peanut.devlibrary.adapter.HolderAdapter;

import java.util.List;

/**
 * Created by anonymouslystudio on 2017/7/28.
 */

public class BBSCommentListAdapter extends HolderAdapter<BBSComment,BBSCommentListAdapter.Holder>{

    public BBSCommentListAdapter(Context context, List<BBSComment> listData) {
        super(context, listData);
    }

    @Override
    public View buildConvertView(LayoutInflater layoutInflater, BBSComment bbsMoment, int position) {
        return layoutInflater.inflate(R.layout.layout_item_bbs_comment,null);
    }

    @Override
    public Holder buildHolder(View convertView, BBSComment bbsMoment, int position) {
        Holder holder = new Holder();
        holder.root = convertView;
        return holder;
    }

    @Override
    public void bindViewDatas(Holder holder, final BBSComment bbsMoment, int position) {
        holder.root.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                BBSMomentDetailActivity.start(context,bbsMoment);
            }
        });
    }

    class Holder{
        View root;
    }
}
